Repository navigation
Conversation
ryohidaka
marked this pull request as draft
November 2, 2026 15:37
ryohidaka
force-pushed
the
bugfix/graphql-pagination
branch
from
November 2, 2026 15:38
30ca86e to
1b41eea
Compare
ryohidaka
marked this pull request as ready for review
November 2, 2026 15:38
ryohidaka
marked this pull request as draft
November 18, 2026 11:32
ryohidaka
force-pushed
the
bugfix/graphql-pagination
branch
from
November 18, 2026 11:52
1b41eea to
cc1bd5f
Compare
Author
動作確認結果11/18時点のデータ数が104件 find content/shops -mindepth 1 -maxdepth 1 -type d | wc -l
104修正前
curl -s https://ramen-api.dev/graphql \
-H 'Content-Type: application/json' \
-d '{
"query": "{ shops(first: 100) { totalCount edges { node { id } } pageInfo { hasNextPage } } }"
}' \
| jq '{
totalCount: .data.shops.totalCount,
count: (.data.shops.edges | length),
hasNextPage: .data.shops.pageInfo.hasNextPage
}'{
"totalCount": 10,
"count": 10,
"hasNextPage": false
}修正後 (ローカル)
curl -s http://localhost:8787/graphql \
-H 'Content-Type: application/json' \
-d '{
"query": "{ shops(first: 100) { totalCount edges { node { id } } pageInfo { hasNextPage } } }"
}' \
| jq '{
totalCount: .data.shops.totalCount,
count: (.data.shops.edges | length),
hasNextPage: .data.shops.pageInfo.hasNextPage
}'{
"totalCount": 104,
"count": 100,
"hasNextPage": true
}
|
ryohidaka
marked this pull request as ready for review
November 18, 2026 12:02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
GraphQL APIでページネーションが効かず、10件以上を取得できない不具合を修正
不具合理由
上限を指定せずに
listShops()を呼び出していたことで、デフォルト上限である先頭10件のみがページネーションの対象になっていました。対応内容
listAllShopsを追加動作確認
手元で動作確認した結果は#115 (comment) に記載
備考
REST APIの挙動に変更はありません。